home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Magazine / PC2Amiga / Samba / docs / textdocs / PROFILES.txt < prev    next >
Text File  |  2000-04-25  |  16KB  |  389 lines

  1. !==
  2. !== PROFILES.txt for Samba release 2.0.7 26 Apr 2000
  3. !==
  4. Contributors:    Bruce Cook <BC3-AU@bigfoot.com>
  5.         Copyright (C) 1998 Bruce Cook
  6.  
  7.         John Terpstra <samba@samba.org>
  8.         Copyright (C) 1998 John H. Terpstra
  9.  
  10.         Wolfgang Ratzka <ratzka@hrz.uni-marburg.de>
  11.         Copyright (C) 1998 Wolfgang Ratzka
  12.  
  13. Created:    April 11, 1998
  14. Updated:    April 11, 1998
  15.  
  16. Subject:    User Profiles
  17. ===========================================================================
  18.  
  19. From BC3-AU@bigfoot.com Sat Apr 11 13:36:05 1998
  20. Date: Sat, 11 Apr 1998 17:13:49 +1000
  21. From: Bruce Cook <BC3-AU@bigfoot.com>
  22. To: Multiple recipients of list <samba-ntdom@samba.org>
  23. Subject: RE: A question about NT Domains
  24.  
  25. Luke Kenneth Casson Leighton writes:
  26.  > On Fri, 10 Apr 1998, Jean-Francois Micouleau wrote:
  27.  > 
  28.  > > On Fri, 10 Apr 1998, Luke Kenneth Casson Leighton wrote:
  29.  > > 
  30.  > > > ah, then i need to explain better.  two or more users have identical
  31.  > > > profiles.  say only one user installs a program which adds additional keys
  32.  > > > into the registry.  those keys, as i understand it, will *not* be removed
  33.  > > > from HKEY_LOCAL_USER when subsequent users log in.
  34.  > > 
  35.  > > under W95 or NT ?
  36.  > 
  37.  > my experience is with Win95, but i expect the same for NT, and have been
  38.  > told that it is so by someone who runs NT admin training courses.
  39.  >  
  40.  > > and why do you want to have one profile shared between multiples users ?
  41.  > 
  42.  > you don't.  how did you get that impression?  i said multiple users with
  43.  > identical profiles, not multiple users sharing one profile.
  44.  
  45. In my experience with both Win95 and NT, is that the HKEY_LOCAL_USER information
  46. is stored in USER.dat or NTuser.DAT for NT.  ALL of this branch is in this file
  47. and there is no overlap between any two users (Unless you have '95 set up
  48. to use a single common profile).
  49.  
  50. [** lkcl: see jht's message for conditions under which an overlap can occur **]
  51.  
  52. The HKEY_LOCAL_MACHINE branch is machine based, and shared by all users of that
  53. machine.
  54.  
  55.  
  56. [And now for a whole stack of caveats]
  57.  
  58. 1. User start menu paths are not stored in the registry (obviously) they're
  59.    a directory structure that located by settings in HKEY_LOCAL_USER.
  60.  
  61.    If you want start menues / desktop / favorites to be individual to a user
  62.    you must set up your user registry so these can be located individually.
  63.    The easiest tool to manage this is the policy editor.
  64.    
  65. 2. When you log onto 'Doze 95, it has to find the user registry.
  66.  
  67.  
  68.    If you have specified a common profile, a "default user" USER.DAT is used.
  69.  
  70.    If you have specified individualised profiles, then USER.DAT will be found
  71.    by the following formula:
  72.  
  73.     1. if NET USE x: /HOME was used at startup, try for x:\USER.DAT (where
  74.        x: is any drive letter from A to Z.
  75.        if no USER.DAT is found go to step 3
  76.  
  77.     2. if no home is specified in a mapping,
  78.        ...\windows\profiles\username\USER.DAT is used. If no USER.DAT exists
  79.        go to step 3.
  80.  
  81.     3. If neither of the previous two found a USER.DAT, then it will use
  82.        a prototype USER.DAT which it will later save to the above specified
  83.        path when the user logs out.
  84.  
  85.        The interesting thing here is that the prototype USER.DAT used here
  86.        is actually a copy of the last USER.DAT used on this machine.  (This
  87.        may be the effect that the original poster is seeing)
  88.  
  89.     4. As discussed above the start menu and desktop are specified in the
  90.        registry contained within USER.DAT.  When a new USER.DAT is created
  91.        from a prototype, new directories are created for the start menu and
  92.        desktop ACCORDING TO HOW THE COPIED PROTOTYPE DEFINES THEM.
  93.  
  94.        So if the prototype USER.DAT says that start menu is in H:\Start Menu
  95.        but programs folder is C:\windows\start menu\programs, then the
  96.        H:\start menu will be created, and the existing machine programs
  97.        folder used.
  98.  
  99.        This means that is is important when creating roving profiles to get
  100.        your prototype USER.DAT and general user directory structure set up
  101.        exactly as you want it, and then make a copy of it that you know will
  102.        be safe from modification.  When creating a new user you then copy
  103.        this prototype into the new user area, so that the new user doesn't
  104.        just inherit what the previous user had.
  105.  
  106.  
  107. 3. When you log onto 'Doze NT, it has to find the user registry.
  108.  
  109.  
  110.    NT is easier to see what's going on, but follows much the same rules as
  111.    '95.  The big difference being that 'NT gets its profile location from
  112.    the login server when it's logged in. (On an NT system have a look at user
  113.    manager/user/profile - you will see that you can specify the user profile
  114.    path) Under NT3.51 this profile path was a path to NTuser.DAT, on 4.0 this
  115.    seems to be a path to a directory structure (haven't played with many NT4
  116.    servers)
  117.  
  118.    I'm not sure how this works in samba, as I haven't yet tried the NT_DOM stuff
  119.    yet (Luke: I assume you have a keyword for this?)
  120.  
  121. [lkcl: nt workstations should look in exactly the same places for things on
  122.        samba or other SMB servers as they do on an NT server, as long as that
  123.        SMB server looks like NT.  if anyone finds that something fails, alert
  124.        us on samba@samba.org and we'll look into it].
  125.  
  126.    When an NT system find a user without a NTuser.DAT, it copies from a
  127.    prototype that it stores especially for this purpose, so while unlike '95
  128.    the user doesn't get whatever happened last on the machine, the user will
  129.    get a fairly minimalist configuration.
  130.  
  131. [[jht:
  132. When a Win95 machine logs onto a Windows NT Domain the Win95 machine looks
  133. for the presence of a file called Config.Pol in the following location:
  134.     \\"Authenticating Server"\NETLOGON
  135. It reads this file and uses it to ammend both the desktop environment as well
  136. as the file %WinDir%\Profiles\%USERNAME%\User.DAT. As with Windows NT, on log
  137. out this file gets written back to the profile server into the %USERNAME%
  138. directory in the profile share.
  139.  
  140. It is thus possible to share a common desktop profile between Windows NT and
  141. Windows 9x.
  142. :jht]]
  143.  
  144.  
  145. 4. There are a *LOT* of reasons that the 'doze machine might not find USER.DAT
  146.    and therefore default to a prototype.
  147.  
  148.     1. Can't execute logon script & therefore no /HOME mapping (Most common)
  149.        .Make sure the script exists
  150.        .that you have your logon script set right
  151.        .Netlogon share must exist
  152.        .Protection/ownership of the script and share
  153.  
  154.     2. no /HOME mapping in the logon script
  155.  
  156.     3. no home path specified in /etc/smb.conf (Or no home mapping set
  157.        up for that user in NT's user manager)
  158.  
  159.     4. Protection/ownership of the user directory
  160.  
  161.     5. protection/ownership of USER.DAT
  162.  
  163.     6. basic networking problems
  164.        .Is the networking available (Test it by manually mapping
  165.         to both the user share and netlogon share)
  166.        .Was the networking working during logon ?
  167.  
  168.     7. Has it defaulted to a prototype, and then had you map the home
  169.        directory afterwards ? - This will result in the bad prototype
  170.        being written into the users home, and them being stuck with it,
  171.        (Just replace USER.DAT again)
  172.  
  173.  
  174. 5. Interesting NOTE
  175.  
  176.     When '95 is performing the logon script, the HKEY_LOCAL_USERS has
  177.     NOT been mapped from the USER.DAT. What has been mapped at this stage
  178.     is the prototype registry (last one used).
  179.  
  180.     I assume the reason for this is that '95 is waiting for the logon
  181.     script to complete so that it can identify where the user's home
  182.     directory is.
  183.  
  184.     If at this point you attempt to do anything that uses the USER registry,
  185.     (installing something for example or reading something from the user
  186.     registry) you will actually be operating on the machine stored prototype
  187.     profile not the user profile.  This means that nothing will realy
  188.     happen to the user setup (No menu items, no settings etc).
  189.  
  190.     To get around this you can name a process in the "run once" entries in
  191.     the HKEY_LOCAL_MACHINE branch, and these "run once" processes will be
  192.     executed once the USER.DAT is loaded, and all the user directories are
  193.     accessible.
  194.  
  195.  
  196. To sum up:
  197.  
  198.     NET USE H: /HOME
  199.     is the key to getting your user profiles loaded from a server.
  200.     NET USE H: \\server\homes
  201.     Won't get it right without a lot of stuffing about.
  202.      
  203.     Windoze '95 goes through a lot to bring you your user profile and
  204.     if anything goes wrong during this process, it will drop back to
  205.     using whatever profile was last used on the machine.
  206.      
  207.  
  208. From samba@aquasoft.com.au Sat Apr 11 13:48:54 1998
  209. Date: Sat, 11 Apr 1998 09:34:08 +1000
  210. From: Samba Bugs <samba@aquasoft.com.au>
  211. To: Multiple recipients of list <samba-ntdom@samba.org>
  212. Subject: Re: A question about NT Domains
  213.  
  214. Just for the sake of completeness I thought I'd add a bit to this.
  215. Let's be clear about which files affect registry changes (or contents).
  216.  
  217. Under NT, open a command prompt interface:
  218. cd %SystemRoot%\System32\config
  219. dir
  220.  
  221. The standard registry files are:
  222.     Default    - all component default settings
  223.     System - all HKLM\System entries
  224.     Software - all HKLM\Software entries
  225.     Security - Domain/Machine releated User Rights & Privs.
  226.     SAM - the Security Access Manager database (ie:Passwords etc.)
  227.  
  228. [[jht:
  229. The SAM and Security files are the only files that get synchronised between
  230. Windows NT Domain Controllers.
  231. :jht]]
  232.  
  233. These are used by EVERYTHING!!
  234.  
  235. When a user logs in the following files get checked:
  236.     1) \\"Authenticating Server"\NETLOGON\NTConfig.Pol
  237.     2) %SystemRoot%\Profiles\Policies\NTConfig.Pol
  238.         this one is a copy of the last NTConfig.Pol downloaded
  239.         from (1) above - if available.
  240.     3) %SystemRoot%\Policies\%UserName%\NTUser.DAT
  241.  
  242. [[jht:
  243. The System Policy Editor on Windows NT can be used to create both the
  244. Windows 95 "Config.Pol" file, as well as the Windows NT "NTConfig.Pol"
  245. file. To create the Windows 95 policy file you MUST load the Windows 95
  246. policy template BEFORE creating the Config.Pol file.
  247. :jht]]
  248.  
  249. The later, is first obtained from a profile server if the User_Init_Info
  250. passed from the Domain Logon Server specifies use of a roaming profile.
  251. If item (3) does NOT exist and/or NO default profile is available one gets
  252. created from the system default settings PLUS the last loaded file at item
  253. (2) above.
  254.  
  255. The HKCU is always unique to the currently logged in user, BUT if the
  256. currently logged in user is using a shared profile that has NOT been made
  257. exclusive then on logout  the HKCU will be written over the top of the
  258. source files. That is why Mandatory profiles are essential when sharing a
  259. roaming profile.
  260.  
  261. On Sat, 11 Apr 1998, Wolfgang Ratzka wrote:
  262.  
  263. > Luke Kenneth Casson Leighton wrote:
  264. > > my experience is with Win95, but i expect the same for NT, and have been
  265. > > told that it is so by someone who runs NT admin training courses.
  266. > On NT it is quite definitely not so. HKCU will always be loaded completely from
  267. > the user's NTuser.dat file and unloaded again after logout.
  268. > In fact HKCU is not a proper registry hive but a symbolic reference to the subkey of
  269. > HKEY_USERS that corresponds to the current user. If more than one user 
  270. > is active on an NT machine (on plain vanilla NT this *is* possible if you have
  271. > services running as a non-system user; on WinFrame or Hydra multiple users
  272. > can be logged in) you will see several subkeys of HKU that correspond to
  273. > the active users and don't interfere with each other.
  274. > Of course some settings that a user can change do not go into the HKCU hive
  275. > but into HKLM, most notably the screen resolution and the number of colours
  276. > (you can use policies to prevent user's from changing these).
  277. > Some applications put information that should go into HKCU into HKLM instead.
  278. > (Hall of Shame: Netscape Communicator, Microsoft Office 97 [User dictionaries!]...).
  279. > Others just use plain good old INI files in their program directory or even 
  280. > in \WINNT\SYSTEM32. Those changes will not be user specific but machine 
  281. > specific and those programs will cause trouble, when one tries to run them
  282. > on WinFrame or Hydra... :-).
  283. > Summarizing:
  284. > Q: Will the next user inherit a previous user's additions
  285. >    to the HKCU registry hive?
  286. > A: Quite definitely not.
  287.  
  288. Correct.
  289.  
  290. > Q: Can a user foul up the configuration for the next user?
  291. > A: Quite definitely yes!
  292.  
  293. See above. Yes, but not if correctly configured.
  294.  
  295. > Q: Is this discussion out of place on the samba-ntdom list?
  296. > A: Errr....
  297.  
  298. Errr... Really? I think it is. Do we, or do we not, want to help people to
  299. gain stable and dependable use of samba?
  300.  
  301. > -- 
  302. > Wolfgang Ratzka (dialing in from home)
  303.  
  304. Cheers,
  305. John H Terpstra (Also from home!!!!)
  306.  
  307. =============================================================================
  308. Further notes by Bruce Cook
  309.  
  310. Date: Sun, 12 Apr 1998 14:12:22 +1000
  311. From: Bruce Cook <BC3-AU@bigfoot.com>
  312. Subject: Re: Win95 / NT Profiles (was: RE: A question about NT Domains)
  313.  
  314. Ah yes I knew there was something I forgot.
  315. here it is for completeness.
  316.  
  317. =============================================================================
  318.  
  319. When a user logs into a specific machine for the first time, they will be
  320. told that they've never logged into the machine, and would they like to
  321. store the user setting for future use.
  322.  
  323. If the user answers NO, they will be nagged about this every time they
  324. log into the machine until they say YES. (How about it MS, could we
  325. possible do something about this feature?)
  326.  
  327. When the user answers YES, thereafter upon logging out of the machine,
  328. a copy of the user's profile is also written onto the machines local disk
  329. for later use.
  330.  
  331. When a user logs into a machine where his/her profile has previously been
  332. saved, a comparison is made between the date of the profile copy kept on
  333. the machine, and the date of the profile stored on the server.  In theory
  334. the server date should be later or the same.
  335.  
  336. If the local machine date is later than the server date, the client
  337. machine will tell you the the settings on the local machine are more
  338. recent than those of the server, and would you like to user them instead.
  339.  
  340. This occurs for a couple of reasons:
  341.     1. Server not available when the user logs out
  342.     2. Date mismatch between the server and the client
  343.        (I always use NET TIME \\server /SET /YES in my logon scripts)
  344.  
  345.  
  346. Logging in with NO server available.
  347.  
  348. In some cases a client will want to log into a network with no server
  349. available. (Portables away from the office, or a dead server)
  350.  
  351. This can only happen if the administrator has NOT set the machine to
  352. give access only upon password verification from the server.
  353. (If the admin has done this, it can be circumvented by restarting
  354.  the machine in safe mode, and running poledit, or regedit and
  355.  disabling that feature)
  356.  
  357. If you are able to log in while the server is unavailable, you have
  358. two choices
  359.     1. Log in as a user that previously stored a profile
  360.        (The password won't have to match unless the machine
  361.         is set up to store passwords)
  362.  
  363.     2. log in as the default user (bit the cancel button or escape key)
  364.  
  365. If you choose to use your profile stored on the local machine, there are
  366. several things you should be wary of:
  367.     1. the profile stored on the machine will be a copy of the last
  368.        profile used when you logged into THAT machine.  You may get
  369.        quite an old profile.
  370.     2. When you log out, that local profile is garunteed to be later
  371.        than the one on the server, and if the server is available, or
  372.        you later log into that machine when the server is available
  373.        you could overwrite the good server profile with a bogus profile.
  374.  
  375.  
  376. Technique note:
  377.     I set portable computers up so that they don't use roaming profiles,
  378.     rather they have a single profile kept on the machine.  This means
  379.     that a user has the same desktop look an feel regardless of where
  380.     they are.   This follows the philosophy that laptops tend to be used
  381.     by only one person.    
  382.